﻿using System.Web.Mvc;

namespace KM.Areas.ADMIN
{
    public class ADMINAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "ADMIN";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Admin_login",
                "KM/login",
                new { Controller = "Users", action = "Login", id = UrlParameter.Optional }
            );

            //context.MapRoute(
            //    "ADMIN_default2",
            //    "KM/{controller}/{action}/{id}/{trangthai}",
            //    new { Controller = "KhuyenMai", action = "Danhsachkhuyenmai", id = UrlParameter.Optional,  }
            //);
            context.MapRoute(
                "ADMIN_default",
                "KM/{controller}/{action}/{id}",
                new { Controller = "KhuyenMai", action = "index", id = UrlParameter.Optional}
            );
        }
    }
}
